tools/hotplug/Linux: Avoid dependency on iptables conntrack module.
authorKeir Fraser <keir@xen.org>
Fri, 17 Dec 2010 16:12:37 +0000 (16:12 +0000)
committerKeir Fraser <keir@xen.org>
Fri, 17 Dec 2010 16:12:37 +0000 (16:12 +0000)
Checking for RELATED,ESTABLISHED traffic being sent to a domU requires
connection tracking, which adds unexpected (to most users) load to
dom0. Heavily loaded systems can fill the conntrack tables.

So avoid this, be more liberal in what we accept, and leave it to domU
to police its own input.

Signed-off-by: Keir Fraser <keir@xen.org>
tools/hotplug/Linux/vif-common.sh

index 05ee712fd9bca4d768122646ffae265964c6a433..76ad0f8c76a5ff1d7c33028374c6c43e5b510ba1 100644 (file)
@@ -105,10 +105,10 @@ frob_iptable()
     local c="-D"
   fi
 
-  iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-in "$vif" "$@" -j ACCEPT \
-    2>/dev/null &&
-  iptables "$c" FORWARD -m state --state RELATED,ESTABLISHED -m physdev \
-    --physdev-is-bridged --physdev-out "$vif" -j ACCEPT 2>/dev/null
+  iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-in "$vif" \
+    "$@" -j ACCEPT 2>/dev/null &&
+  iptables "$c" FORWARD -m physdev --physdev-is-bridged --physdev-out "$vif" \
+    -j ACCEPT 2>/dev/null
 
   if [ "$command" == "online" -a $? -ne 0 ]
   then